import Vue from 'vue'
import Component from './fun-notify'

const NotificationConstructor = Vue.extend(Component)

const notifyMessage = (options) => {
  const instance  = new NotificationConstructor({
    propsData: {
      ...options
    }
  })
  instance.vm = instance.$mount()
  document.body.appendChild(instance.vm.$el)
}

export default notifyMessage
